// vue reactive ref 
// useState function (num) {



//     return [num,setCount()=>{
//         this.useState ({
            
//         })
//     }]
// }
import React ,{useState} from 'react'

function App() {
    const [count,setCount] = useState(0)

    const addcount=()=>{
        let newcount = count 
        setCount(newcount+1)
        setCount(newcount+1)
        setCount(newcount+1)
        setCount(newcount+1)
        setCount(newcount+1)
        setCount(newcount+1)
        setCount(newcount+1)
        setCount(newcount+1)
        // var setcount = function(a){

        //     this.setState({
        //         count:a
        //     })
        // }


    }
    return (
        <div>
            <h1>{count}</h1>
            <button onClick={addcount}> +1点击</button>
        </div>
    )
}



export default App

